<?php

function tm_item( $section, $urltext, $url) 
{
    global $sec;
    if($sec != $section) {
        $href = '<a class="passive" href="' . $url.'" >' . $urltext . '</a>';
        echo '  <span class="item">' . $href ."</span>\n";
    }
    else {
        $href = '<a class="active" href="' . $url.'" >' . $urltext . '</a>';
        echo '<span class="item_active">' . $href . "</span>\n";
    }

}

?>
<div class="padm_topmenu">
<?
tm_item( 'main',    'Main Menu', '?sec=main' );
tm_item( 'acc',     'Accounts',  '?sec=acc' );
tm_item( 'chat',    'Chat',      '?sec=chat' );
tm_item( 'forum',   'Forum',     '?sec=forum' );
tm_item( 'sett',    'Settings',  '?sec=sett' );
tm_item( 'ipblock', 'IP Blocks', '?sec=ipblock' );
tm_item( 'link',    'Linkroll',  '?sec=link' );
tm_item( 'quot',    'Quotes',    '?sec=quot' );

?>
</div>

